//
//  ViewController.m
//  03-Homework
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "UILabel+TouchEvent.h"
#import "UIImageView+TouchEvent.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 200) text:@"button" target:self action:@selector(clickLabel:)];
    label.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:label];
    
    UIImage *image = [UIImage imageNamed:@"3.jpg"];
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 300, 375, 300) image:image target:self action:@selector(clickImageView:)];
    [self.view addSubview:imageView];
    
    
}

- (void)clickLabel:(UILabel *)label {
    NSLog(@"LabelButton");
}

- (void)clickImageView:(UIImageView *)imageView {
    NSLog(@"imageButton");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
